package org.jeecg.modules.dashboard.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 首页仪表盘
 * @TableName pro_dashboard
 */
@TableName(value ="proc_dashboard")
@Data
public class Dashboard {
    /**
     *
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 总供应商数量
     */
    @ApiModelProperty(value = "总供应商数量")
    @Column(name = "total_suppliers")
    private Integer totalSuppliers;

    /**
     * 进行中的项目数量
     */
    @ApiModelProperty(value = "进行中的项目数量")
    @Column(name = "ongoing_projects")
    private Integer ongoingProjects;

    /**
     * 今日开标的数量
     */
    @ApiModelProperty(value = "今日开标的数量")
    @Column(name = "today_open_tenders")
    private Integer todayOpenTenders;

    /**
     * 活跃供应商数量
     */
    @ApiModelProperty(value = "活跃供应商数量")
    @Column(name = "active_suppliers")
    private Integer activeSuppliers;

    /**
     * 总计金额
     */
    @ApiModelProperty(value = "总计金额")
    @Column(name = "total_amount")
    private BigDecimal totalAmount;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "created_at")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}
